home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
DB_CLIPP
/
2611.ZIP
/
MANIFEST.ZIP
/
MANDIS.PRG
< prev
next >
Wrap
Text File
|
1988-04-14
|
13KB
|
509 lines
******************
* MANDIS.PRG *
* DISPLAY MENU *
* CHOICE 3 *
* APR 14, 1988 *
* GUY DUBEC *
******************
CLEA
STOR ' ' TO CHOICE
STOR 'F' TO END
@1,23 TO 5,55 DOUBLE
@2,24 TO 4,54 DOUBLE
@3,26 SAY 'Manifest Information System'
@7,32 TO 9,48 DOUBLE
@8,34 SAY 'Display Menu'
DO WHIL END='F'
@10,18 TO 16,62
@11,20 SAY '1 - Display a single manifest'
@12,20 SAY '2 - Display information about an EPA ID'
@13,20 SAY '3 - Display all manifests to an EPA ID'
@14,20 SAY '4 - Display all manifests on a given date'
@15,20 SAY 'R - Return to Main Menu'
@18,22 SAY 'Enter your choice, and press <ENTER>'
@19,35 SAY 'Choice : ' GET CHOICE
READ
DO CASE
CASE CHOICE='1'
CLEA
STOR SPACE(15) TO MANNOA
STOR 'F' TO END
STOR ' ' TO CHOICE
@1,23 TO 5,55 DOUBLE
@2,24 TO 4,54 DOUBLE
@3,26 SAY 'Manifest Information System'
@7,25 TO 9,54
@8,27 SAY 'Display a Single Manifest'
@10,0 SAY 'Manifest Number : ' GET MANNOA
@12,0 SAY 'Enter manifest number to be displayed and press ì
<ENTER>'
READ
SELECT 1
USE MANIFEST INDEX MANIFEST
SELECT 2
USE WASTE INDEX MANWST
SELECT 1
FIND &MANNOA
IF .NOT. EOF()
@12,0 CLEA
@10,50 SAY 'Ship Date : '
@10,62 SAY SHIP
@11,0 SAY 'Generator EPA ID No. : '
@11,23 SAY GENID
@11,47 SAY 'Receipt Date : '
@11,62 SAY REC
@12,0 SAY 'Generator Name : '
SELECT 3
USE FACILITY INDEX FACID
FIND &GENID
@12,17 SAY NAME
SELECT 1
@13,0 SAY 'Transporter EPA ID No. : '
@13,25 SAY TRANID
@14,0 SAY 'Transporter Name : '
SELECT 4
USE TRANS INDEX TID
FIND &TRANID
@14,19 SAY NAME
SELECT 1
@15,0 SAY 'Disposer EPA ID No. : '
@15,22 SAY TSDID
SELECT 5
USE DISP INDEX DID
FIND &TSDID
@16,0 SAY 'Disposer Name : '
@16,16 SAY NAME
SELECT 2
FIND &MANNOA
DO WHIL MANNO=MANNOA
@17,0 SAY 'Waste Description : '
@17,20 SAY DESC
SKIP
IF MANNO=MANNOA
@18,0 SAY 'Waste Description : '
@18,20 SAY DESC
ENDIF
SKIP
IF MANNO=MANNOA
@19,0 SAY 'Waste Description : '
@19,20 SAY DESC
ENDIF
SKIP
IF MANNO=MANNOA
@20,0 SAY 'Waste Description : '
@20,20 SAY DESC
ENDIF
SKIP
IF MANNO=MANNOA
@21,0 SAY 'Waste Description : '
@21,20 SAY DESC
ENDIF
SKIP
IF MANNO=MANNOA
?
WAIT 'More wastes to display. Press any key to continue . . ì
.'
ENDIF
ENDDO
@22,0 CLEA
@23,0 SAY 'Hard copy of this manifest data ? (Y/N) : ' GET ì
CHOICE
READ
IF CHOICE='N'
@23,0 CLEA
WAIT 'Press any key to return to display menu . . .'
CLOS DATA
RETURN
ENDIF
IF CHOICE='Y'
SELECT 1
STOR 1 TO LINE
@0,0
SET DEVI TO PRINT
STOR 5 TO LINE
@LINE,5 SAY 'Manifest Number : '+MANNO+' '+'Ship Date : ì
'+SHIP+' '+'Receipt Date : '+REC
STOR LINE+2 TO LINE
SELECT 3
@LINE,5 SAY 'Generator EPA ID & Name : '+EPAID+' '+NAME
STOR LINE+2 TO LINE
SELECT 4
@LINE,5 SAY 'Transporter EPA ID & Name : '+EPAID+' '+NAME
STOR LINE+2 TO LINE
SELECT 5
@LINE,5 SAY 'Disposer EPA ID & Name : '+EPAID+' '+NAME
SELECT 1
STOR LINE+2 TO LINE
@LINE,5 SAY 'Ship Date : '+SHIP
@LINE,40 SAY 'Receipt Date : '+REC
SELECT 2
GO TOP
FIND &MANNOA
DO WHIL MANNO=MANNOA
STOR LINE+2 TO LINE
@LINE,5 SAY 'Waste Description : '+DESC
STOR LINE+1 TO LINE
@LINE,5 SAY 'Quantity : '+QUANT+' '+'Unit : '+UNIT+' ì
'+'Container Type : '+CONTYP+' '+'No. Containers : '+CONTNO
STOR LINE+1 TO LINE
@LINE,5 SAY 'EPA Code : '+EPACODE+' '+'State Code : ì
'+STCODE+' '+'Hazard Code : '+HAZCOD+' '+'Physical State : ì
'+PHYST
STOR LINE+1 TO LINE
@LINE,5 SAY 'Handling Codes : '+HAND1+', '+HAND2+', ì
'+HAND3+', '+HAND4
SKIP
ENDDO
EJECT
SET DEVI TO SCREEN
@23,0 CLEA
WAIT 'Press any key to return to display menu . . .'
CLOS DATA
RETURN
CASE CHOICE='2'
CLEA
STOR ' ' TO CHOICE
STOR SPACE(12) TO EPAIDA
STOR 'F' TO END
@1,23 TO 5,55 DOUBLE
@2,24 TO 4,54 DOUBLE
@3,26 SAY 'Manifest Information System'
@7,25 TO 9,54 DOUBLE
@8,27 SAY 'Display EPA ID Information'
DO WHIL END='F'
@11,0 SAY 'Enter EPA ID to display : ' GET EPAIDA
READ
SELECT 1
USE FACILITY INDEX FACID
FIND EPAIDA
IF EOF()
SELECT 2
USE TRANS INDEX TID
FIND EPAIDA
IF EOF()
SELECT 3
USE DISP INDEX DID
FIND EPAIDA
IF EOF()
@15,0 SAY 'EPA ID Number not found. Enter a new number.'
STOR SPACE(12) TO EPAIDA
?
WAIT 'Press any key to continue . . .'
@15,0 CLEA
ENDIF
ENDIF
ENDIF
@13,0 SAY "Facility Name ; '
@13,16 SAY NAME
@15,0 SAY 'Facility Address ; '
@15,19 SAY ADD1
@16,19 SAY ADD2
@18,0 SAY 'City ; '
@18,7 SAY CITY
@18,34 SAY "State : '
@18,42 SAY STATE+' '+ZIP
@18,55 SAY 'Phone : '
@18,63 SAY ì
'('+SUBSTR(PHONE,1,3)+')'+SUBSTR(PHONE,4,3)+'-'+SUBSTR(PHONE,7)
@20,0 SAY 'Print hard copy of this information (Y/N) ? ' GET ì
CHOICE
READ
IF UPPER(CHOICE)='N'
@20,0 CLEA
STOR ' ' TO CHOICE
@20,0 SAY 'Display another EPA ID (Y/N) ? ' GET CHOICE
READ
IF UPPER(CHOICE)='N'
CLOS DATA
RETURN
ENDIF
IF UPPER(CHOICE)='Y'
STOR ' ' TO CHOICE
STOR SPACE(12) TO EPAIDA
@11,0 CLEA
ENDIF
ENDIF
IF UPPER(CHOICE)='Y'
@0,0
SET DEVI TO PRIN
STOR 2 TO LINE
@LINE,5 SAY 'Information about EPA ID No. : '+EPAID
STOR LINE+2 TO LINE
@LINE,5 SAY 'Facility Name : '+NAME
STOR LINE+2 TO LINE
@LINE,5 SAY 'Address : '+ADD1
IF ADD2 <> ' '
STOR LINE+2 TO LINE
@LINE,15 SAY ADD2
ENDIF
STOR LINE+2 TO LINE
@LINE,5 SAY 'City : '+CITY+' State : '+STATE+' Zip : '+ZIP
STOR LINE+2 TO LINE
@LINE,5 SAY 'Phone : ì
'+'('+SUBSTR(PHONE,1,3)+')'+SUBSTR(PHONE,4,3)+'-'+SUBSTR(PHONE,7)
EJECT
STOR 2 TO LINE
SET DEVI TO SCRE
ENDIF
@20,0 CLEA
STOR ' ' TO CHOICE
@20,0 SAY 'Display another EPA ID (Y/N) ? 'GET CHOICE
READ
IF UPPER(CHOICE)='N'
CLOS DATA
RETURN
ENDIF
IF UPPER(CHOICE)='Y'
STOR ' ' TO CHOICE
STOR SPACE(12) TO EPAIDA
@11,0 CLEA
ENDIF
ENDDO
CASE CHOICE='3'
CLEA
STOR ' ' TO CHOICE,CHOICE1
STOR SPACE(12) TO EPAIDA
STOR 'F' TO END
@1,23 TO 5,55 DOUBLE
@2,24 TO 4,54 DOUBLE
@3,24 SAY 'Manifest Information System'
@7,24 TO 9,55 DOUBLE
@8,26 SAY 'List Manifests For An EPA ID'
DO WHIL END='F'
@11,0 SAY 'Enter EPA ID No. for listing : ' GET EPAIDA
@12,0 SAY 'Generator, Transporter or Disposer (G/T/D) ? ' GET ì
CHOICE
READ
@12,0 CLEA
@13,0 SAY 'Manifest No.'+SPACE(9)+'Ship Date'+SPACE(5)+'Receipt ì
Date'
DO CASE
CASE CHOICE='G'
ERASE MANGEN.NDX
USE MANIFEST
INDEX ON GENID+SHIP TO MANGEN
GO TOP
FIND &EPAIDA
DO WHIL EPAIDA=GENID
STOR 15 TO LINE
IF LINE<21
@LINE,0 SAY MANNO+SPACE(6)+SHIP+SPACE(8)+REC
STOR LINE+1 TO LINE
SKIP
ELSE
?
WAIT 'Press any key to display more entries . . .'
STOR 15 TO LINE
@15,0 CLEA
ENDIF
ENDDO
CASE CHOICE='T'
ERASE MANTRAN.NDX
USE MANIFEST
INDEX ON TRANID+SHIP TO MANTRAN
GO TOP
FIND &EPAIDA
DO WHIL EPAIDA=TRANID
STOR 15 TO LINE
IF LINE<21
@LINE,0 SAY MANNO+SPACE(6)+SHIP+SPACE(8)+REC
STOR LINE+1 TO LINE
SKIP
ELSE
?
WAIT 'Press any key to display more entries . . .'
STOR 15 TO LINE
@15,0 CLEA
ENDIF
ENDDO
CASE CHOICE='D'
ERASE MANDISP.NDX
USE MANIFEST
INDEX ON TSDID+SHIP TO MANDISP
GO TOP
FIND &EPAIDA
DO WHIL EPAIDA=TSDID
STOR 15 TO LINE
IF LINE<21
@LINE,0 SAY MANNO+SPACE(6)+SHIP+SPACE(8)+REC
STOR LINE+1 TO LINE
SKIP
ELSE
?
WAIT 'Press any key to display more entries . . .'
STOR 15 TO LINE
@15,0 CLEA
ENDIF
ENDDO
ENDCASE
@22,0 SAY 'Do you want a hard copy of this report (Y/N) ? ' ì
GET CHOICE1
READ
IF CHOICE1='N'
CLOS DATA
STOR ' ' TO CHOICE,CHOICE1
RETURN
ENDIF
IF CHOICE1='Y'
DO CASE
CASE CHOICE='G'
GO TOP
FIND &EPAIDA
DO WHIL EPAIDA=GENID
STOR 2 TO LINE
@0,0
SET DEVI TO PRIN
@LINE,10 SAY 'List of Manifests for EPA ID '+GENID
STOR LINE+2 TO LINE
@LINE,10 SAY 'Facility Name : '+TRIM(NAME)+', ì
'+TRIM(CITY)+', '+STATE+' (GENERATOR)'
STOR LINE+3 TO LINE
@LINE,10 SAY 'Manifest No.'+SPACE(9)+'Ship ì
Date'+SPACE(5)+'Receipt Date'
STOR LINE+2 TO LINE
STOR 60 TO MAX
IF LINE<MAX
@LINE,10 SAY MANNO+SPACE(6)+SHIP+SPACE(8)+REC
STOR LINE+1 TO LINE
SKIP
ELSE
EJECT
ENDIF
ENDDO
SET DEVI TO SCRE
CASE CHOICE='T'
GO TOP
FIND &EPAIDA
DO WHIL EPAIDA=TRANID
STOR 2 TO LINE
@0,0
SET DEVI TO PRIN
@LINE,10 SAY 'List of Manifests for EPA ID '+TRANID
STOR LINE+2 TO LINE
@LINE,10 SAY 'Facility Name : '+TRIM(NAME)+', ì
'+TRIM(CITY)+', '+STATE+' (TRANSPORTER)'
STOR LINE+3 TO LINE
@LINE,10 SAY 'Manifest No.'+SPACE(9)+'Ship ì
Date'+SPACE(5)+'Receipt Date'
STOR LINE+2 TO LINE
STOR 60 TO MAX
IF LINE<MAX
@LINE,10 SAY MANNO+SPACE(6)+SHIP+SPACE(8)+REC
STOR LINE+1 TO LINE
SKIP
ELSE
EJECT
ENDIF
ENDDO
SET DEVI TO SCRE
CASE CHOICE='D'
GO TOP
FIND &EPAIDA
DO WHIL EPAIDA=TSDID
STOR 2 TO LINE
@0,0
SET DEVI TO PRIN
@LINE,10 SAY 'List of Manifests for EPA ID '+TSDID
STOR LINE+2 TO LINE
@LINE,10 SAY 'Facility Name : '+TRIM(NAME)+', ì
'+TRIM(CITY)+', '+STATE+' (DISPOSER)'
STOR LINE+3 TO LINE
@LINE,10 SAY 'Manifest No.'+SPACE(9)+'Ship ì
Date'+SPACE(5)+'Receipt Date'
STOR LINE+2 TO LINE
STOR 60 TO MAX
IF LINE<MAX
@LINE,10 SAY MANNO+SPACE(6)+SHIP+SPACE(8)+REC
STOR LINE+1 TO LINE
SKIP
ELSE
EJECT
ENDIF
ENDDO
SET DEVI TO SCRE
ENDCASE
@22,0 CLEA
WAIT 'Press any key to continue . . .'
ENDIF
ENDDO
CASE CHOICE='4'
CLEA
STOR ' ' TO CHOICE
STOR SPACE(6) TO DATE
STOR 'F' TO END
@1,23 TO 5,55 DOUBLE
@2,24 TO 4,54 DOUBLE
@3,26 SAY 'Manifest Information System'
@7,22 TO 9,58 DOUBLE
@8,24 SAY 'List Manifests on a Given Date'
DO WHIL END='F'
@11,0 SAY 'Enter shipping date for listing (YYMMDD) : ' GET ì
DATE
READ
ERASE MANDATE.NDX
USE MANIFEST
INDEX ON SHIP TO MANDATE
FIND &DATE
@13,0 SAY 'Manifest No.'+SPACE(8)+'Receipt Date'
DO WHIL DATE=SHIP
STOR 20 TO MAX
STOR 14 TO LINE
IF LINE<MAX
@LINE,0 SAY MANNO+SPACE(7)+REC
SKIP
STOR LINE+1 TO LINE
ELSE
EJECT
?
WAIT 'Press any key to display more entries . . .'
STOR 14 TO LINE
@14,0 CLEA
ENDIF
ENDDO
@21,0 SAY 'Do you want a hard copy of this report (Y/N) ? ' GET ì
CHOICE
READ
IF UPPER(CHOICE)='N'
CLOS DATA
STOR ' ' TO CHOICE
RETURN
ENDIF
IF UPPER(CHOICE)='Y'
STOR 2 TO LINE
STOR 60 TO MAX
GO TOP
FIND &DATE
DO WHIL DATE=SHIP
@0,0
SET DEVI TO PRIN
@LINE,10 SAY 'Listing of Manifests Shipped on '+DATE
STOR LINE+2 TO LINE
@LINE,10 SAY 'Manifest No.'+SPACE(8)+'Receipt Date'
STOR LINE+2 TO LINE
IF LINE<MAX
@LINE,10 SAY MANNO+SPACE(7)+REC
STOR LINE+1 TO LINE
SKIP
ELSE
EJECT
ENDIF
ENDDO
SET DEVI TO SCREE
@21,0 CLEA
WAIT 'Press any key to return to menu.'
CLOS DATA
RETURN
ENDDO
CASE CHOICE='R'
CLEAR
STOR ' ' TO CHOICE
RETURN
OTHERWISE
?CHR(7)
@21,20 SAY 'Invalid Entry - Try Again'
STOR ' ' TO CHOICE
WAIT 'Press any key to continue . . . '
@21,0 CLEA
ENDCASE
ENDDO